from . import db


class Channel(db.Model):
    """用户模型类"""
    __tablename__ = 'channels'
    id = db.Column(db.Integer, primary_key=True, doc='频道ID')
    channel_name = db.Column(db.String(20), unique=True, doc='频道名')


class Video(db.Model):
    """图片视频类"""
    __tablname__ = 'source'
    id = db.Column(db.Integer, primary_key=True, doc='资源ID')
    message = db.Column(db.String(50), doc='资源信息')
    channel = db.Column(db.Integer, doc='频道ID')
    url = db.Column(db.String(90), doc='URL')
